package cn.zktr.Personnel.controllers.zhouxiong;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.SessionAttributes;

import cn.zktr.Personnel.common.TimeStamp;
import cn.zktr.Personnel.model.pojos.PerCwaRem;
import cn.zktr.Personnel.model.service.zhouxiong.CwaRemService;

@Controller
//日历
public class CalenderController {
	@Autowired
	public CwaRemService cy;
	@Autowired
	private CwaRemService cys;
	
	
	@RequestMapping("zx/kao-qin-ti-xin")
	public void dome() {
		
	}
	
	@PostMapping("savecalendar")
	@ResponseBody
	public void savecalender(String Iremind,Timestamp imouthyear) {
		cy.addCalender(Iremind,imouthyear);
	}
	
	@PostMapping("selecttoday")
	@ResponseBody
	public List<PerCwaRem> selecttoday(String a,Model model) {
		model.addAttribute("manylist", cy.findMany(a));
		return cy.findMany(a);
	}
	
	@PostMapping("calendaryf")
	@ResponseBody
	public List<PerCwaRem> findOne(String imouthyear) {
		List<PerCwaRem> findAll = cys.findAll(imouthyear);
		return findAll;
	}
}
